<!--空白页面参考模版-->
{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
    <div class="row" style="display: none;">
        <div class="col-md-12">
            <div class="box box-default">
                <div class="box-header with-border">
                    <div class="btn-group">
                        <a class="btn flat btn-sm btn-default BackButton">
                            <i class="fa fa-arrow-left"></i>
                            返回
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">

            <!-- Custom Tabs -->
            <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    {foreach name='data_config' id='item'}
                    <li {if $key==0}class="active"{/if}><a href="#tab_{$key}" data-toggle="tab">{$item.name}</a></li>
                    {/foreach}
                </ul>
                <div class="tab-content">
                    {foreach name='data_config' id='item'}
                    <div class="tab-pane {if $key==0}active{/if}" id="tab_{$key}">

                        <form class="form-horizontal dataForm" action="{:url('setting/update')}" method="post"
                              enctype="multipart/form-data">
                            <div class="box-body">
                                <input name="id" value="{$item.id}" hidden>

                                {foreach name='item.content' id='data' key='kk'}
                                {$data.form|raw}
                                {/foreach}

                            </div>

                            <!--表单底部-->
                            <div class="box-footer">
                                {:token()}
                                <div class="col-sm-2">
                                </div>
                                <div class="col-sm-10 col-md-4">
                                    <div class="btn-group">
                                        <button type="submit" class="btn flat btn-info dataFormSubmit">
                                            保存
                                        </button>
                                    </div>
                                    <div class="btn-group">
                                        <button type="reset" class="btn flat btn-default dataFormReset">
                                            重置
                                        </button>
                                    </div>
                                </div>
                            </div>

                        </form>

                    </div>
                    {/foreach}

                </div>
            </div>
        </div>
    </div>
</section>

<script>
    $.each($('.dataForm'), function (index, item) {
        $(item).validate({});
    })
</script>

{/block}